<%@ Page Language="C#" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="install_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>BlogEngine.NET Setup</title>
    <style type="text/css" media="screen">
		td.label {
			vertical-align: top;
			white-space: nowrap;
			width: 200px;
		}
		
		input.text {
			width: 200px;
		}
		
		table {
			width: 100%;
		}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
		<h1>BlogEngine.NET Setup</h1>
		
		<asp:Panel ID="alreadySetupPanel" runat="server">
		<p>You have already setup an administrator please check with your webmaster if you don't have the login anymore.</p>
		</asp:Panel>
		<asp:Panel ID="setupPanel" runat="server">
		<p>Please enter the administrator that will be your main account for BlogEngine.NET.  After you are finished please <strong>delete the install directory</strong>.</p>

		<fieldset>
			<legend>User</legend>
			<table>
				<tr>
					<td class="label"><label for="<%= userLogin.ClientID %>">Administrator Login:</label></td>
					<td><asp:TextBox ID="userLogin" runat="server" CssClass="text" /></td>
				</tr>
				<tr>
					<td class="label"><label for="<%= userPassword.ClientID %>">Administrator Password:</label></td>
					<td><asp:TextBox ID="userPassword" runat="server" TextMode="Password" CssClass="text" /><br />
						<asp:TextBox ID="userConfirmPassword" runat="server" TextMode="Password" CssClass="text" /><asp:CompareValidator ID="passwordValidator" runat="server" Display="Dynamic" ErrorMessage="Please make sure the passwords are the same." ControlToCompare="userConfirmPassword" ControlToValidate="userPassword" /></td>
				</tr>
				<tr>
					<td class="label"><label for="<%= userEmail.ClientID %>">Administrator Email:</label></td>
					<td><asp:TextBox ID="userEmail" runat="server" CssClass="text" /><asp:RegularExpressionValidator ID="emailValidator" runat="server" Display="Dynamic" ErrorMessage="Please enter a valid email address." ControlToValidate="userEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" /><br />
					<em>i.e. you@somesite.com</em></td>
				</tr>
			</table>
		</fieldset>
		<fieldset>
			<legend>Blog</legend>
			<table>
				<tr>
					<td class="label"><label for="<%= blogName.ClientID %>">Name:</label></td>
					<td><asp:TextBox ID="blogName" runat="server" CssClass="text" /></td>
				</tr>
				<tr>
					<td class="label"><label for="<%= blogDescription.ClientID %>">Description:</label></td>
					<td><asp:TextBox ID="blogDescription" runat="server" CssClass="text" /></td>
				</tr>
				<tr>
					<td class="label"><label for="<%= blogLocation.ClientID %>">Blog Location:</label></td>
					<td><asp:TextBox ID="blogLocation" runat="server" CssClass="text" /><asp:RegularExpressionValidator ID="locationValidator" runat="server" Display="Dynamic" ErrorMessage="Please enter a valid URL." ControlToValidate="blogLocation" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?" /><br />
					<em>i.e. http://www.somesite.com/blog</em></td>
				</tr>
			</table>
		</fieldset>
		
		<p><asp:Button ID="runButton" runat="server" Text="Run Setup" OnClick="runButton_Click" /></p>
		</asp:Panel>
    </div>
    </form>
</body>
</html>
